// 重置样式
* {
  box-sizing: border-box;
}

html {
  height: 100%;
  font-size: 14px;
}

body {
  height: 100%;
  color: #333;
  min-width: 1240px;
  font: 1em/1.4 'Microsoft Yahei', 'PingFang SC', 'Avenir', 'Segoe UI', 'Hiragino Sans GB', 'STHeiti', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif
}

ul,
h1,
h3,
h4,
p,
dl,
dd {
  padding: 0;
  margin: 0;
}

.g-relative {
  position: relative;
}

a {
  text-decoration: none;
  color: #333;
  outline: none;
}

i {
  font-style: normal;
}

input[type="text"],
input[type="search"],
input[type="password"],
input[type="checkbox"] {
  padding: 0;
  outline: none;
  border: none;
  -webkit-appearance: none;

  &::placeholder {
    color: #ccc;
  }
}

img {
  max-width: 100%;
  max-height: 100%;
  vertical-align: middle;
}

ul {
  list-style: none;
}

#app {
  background: #f5f5f5;
  user-select: none;
}

.container {
  width: 1240px;
  margin: 0 auto;
  position: relative;
}

/* 文字超出自动截取 */
.ellipsis {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.ellipsis-2 {
  word-break: break-all;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.fl {
  float: left;
}

.fr {
  float: right;
}

.clearfix:after {
  content: ".";
  display: block;
  visibility: hidden;
  height: 0;
  line-height: 0;
  clear: both;
}

// 离开时候淡出动画
.fade {
  &-leave {
    &-active {
      // 动画的父容器需要定位???, 防止定位跑偏
      position: absolute;
      width: 100%;
      transition: opacity 0.5s 0.2s;
      z-index: 1;
    }

    &-to {
      opacity: 0;
    }
  }
}

.slide-right {
  // 进入动画: 右移 20px的位移, 透明度为0  -->  本来位置 没有位移, 透明度1
  &-enter-from {
    opacity: 0;
    transform: translateX(20px);
  }

  &-enter-to {
    opacity: 1;
    transform: none;
  }

  // 离开: 本来位置 没有位移 透明度为1  -->  右侧 20px的位置 透明度为0
  &-leave-from {
    opacity: 1;
    transform: none;
  }

  &-leave-to {
    opacity: 0;
    transform: translateX(20px);
  }

  &-enter-active,
  &-leave-active {
    transition: all 0.5s;
  }
}

.fade-right-enter-to,
.fade-right-leave-from {
  opacity: 1;
  transform: none;
}

.fade-right-enter-active,
.fade-right-leave-active {
  transition: all .5s;
}

.fade-right-enter-from,
.fade-right-leave-to {
  opacity: 0;
  transform: translate3d(20px, 0, 0);
}

.xtx-form {
  margin-top: 40px;

  .user-info {
    display: flex;
    align-items: center;
    width: 320px;
    height: 70px;
    background-color: #f2f2f2;
    margin: 0 auto 20px;
    padding-left: 10px;

    img {
      width: 50px;
      height: 50px;
    }

    span {
      padding-left: 10px;
      padding-right: 15px;
    }
  }

  .xtx-form-item {
    display: flex;
    align-items: center;
    margin: 0 auto 25px;
    //width: 320px;
    width: 700px;
    height: 50px;

    .label {
      width: 180px;
      padding-right: 10px;
      text-align: right;
      color: #999;
    }

    .input {
      position: relative;
      height: 50px;
      width: 320px;
      margin-left: 190px;

      > i {
        position: absolute;
        // 实现input的 focus 状态的外边框包裹着这个 icon 图标
        // 所以向左下偏移1px, 并且 width 和 height的值 减 2
        top: 1px;
        left: 1px;
        width: 34px;
        height: 48px;
        line-height: 48px;
        text-align: center;
        color: #999;
      }

      > input {
        padding-left: 45px;
        width: 100%;
        height: 50px;
        line-height: 50px;
        border: 1px solid #e4e4e4;

        &.error {
          border-color: @priceColor;
        }

        &.active, &:focus {
          border-color: @xtxColor;
        }
      }

      .code {
        position: absolute;
        padding: 0 10px;
        top: 1px;
        right: 1px;
        height: 50px;
        line-height: 50px;
        text-align: center;
        color: #999;
        cursor: pointer;
      }
    }

    > .error {
      width: 180px;
      padding-left: 10px;
      color: @priceColor;
    }

  }

  .btn {
    display: block;
    margin: 0 auto;
    height: 50px;
    width: 320px;
    line-height: 50px;
    text-align: center;

    color: #fff;
    border-radius: 4px;
    font-size: 18px;
    background-color: @xtxColor;
  }
}

// 去除 数字输入框后面那个上下箭头的样式
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

input[type="number"] {
  -moz-appearance: textfield;
}
